
import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

// 二级路由
export const CHILDNRE_ROUTES: RouteRecordRaw[] = [
  {
    path: '/home',
    meta: {
      title: '首页',
    },
    component: () => import('../views/home/index.vue'),
  },
  {
    path: '/jiankang',
    meta: {
      title: '健康+',
    },
    component: () => import('../views/jiankang/index.vue'),
  },
  {
    path: '/shop',
    meta: {
      title: '商城',
    },
    component: () => import('../views/shop/index.vue'),
  },
  {
    path: '/zixun',
    meta: {
      title: '我的咨询',
    },
    component: () => import('../views/zixun/index.vue'),
  },
  {
    path: '/my',
    meta: {
      title: '个人中心',
    },
    component: () => import('../views/my/index.vue'),
  },
]
//  一级路由
export const ROOT_ROUTES: RouteRecordRaw[] = [
  {
    path: '/yd',
    component: () => import('../views/yd/index.vue'),
    meta: {
      title: '引导页',
    },
  },
  {
    path: '/',
    component: () => import('../views/layout/index.vue'),
    redirect: '/home',
    children: CHILDNRE_ROUTES,
  },
  {
    path: '/login',
    meta: {
      title: '登录',
    },
    component: () => import('../views/login/index.vue'),
  },
  // {
  //   path: '/search',
  //   meta: {
  //     title: '搜索',
  //   },
  //   component: () => import('../views/search/index.vue'),
  // },
  // {
  //   path: '/shopdetail',
  //   meta: {
  //     title: '商城详情',
  //   },
  //   component: () => import('../views/shopdetail/index.vue'),
  // },
    {
    path: '/cart',
    meta: {
      title: '购物车',
    },
    component: () => import('../views/cart/index.vue'),
  },
  //  {
  //   path: '/order',
  //   meta: {
  //     title: '订单页',
  //   },
  //   component: () => import('../views/order/index.vue'),
  // },
  {
    path: '/Tce',
    meta: {
      title: '春雨中医馆页面',
    },
    component: () => import('../views/Tce/index.vue'),
  },
  {
    path: '/shopdetail/:id',
    meta: {
      title: '商城详情',
    },
    component: () => import('../views/shopdetail/index.vue'),
  },
  {
    path: '/search',
    meta: {
      title: '搜索',
    },
    component: () => import('../views/search/index.vue'),
  },
  {
    path:'/shouSearch',
    meta:{
      title:'首页搜索',
    },
    component:()=>import('../views/ShouSearch/index.vue')
  },
   {
    path: '/kepudetail',
    meta: {
      title: '专家详情',
    },
    component: () => import('../views/kepudetail/index.vue'),
  },
  {
    // 路由路径
    path: '/skin',
    // 路由名称
    meta: {
      title: '皮肤用药',
    },
    // 路由组件
    component: () => import('../views/skin/index.vue'),
  },
  {
    // 路由路径
    path: '/breathing',
    // 路由名称
    meta: {
      title: '呼吸用药',
    },
    // 路由组件
    component: () => import('../views/breathing/index.vue'),
  },
  {
    // 路由路径
    path: '/gynaecology',
    // 路由名称
    meta: {
      title: '妇科用药',
    },
    // 路由组件
    component: () => import('../views/gynaecology/index.vue'),
  },
  {
    // 路由路径
    path: '/stomach',
    // 路由名称
    meta: {
      title: '肠胃消化',
    },
    // 路由组件
    component: () => import('../views/stomach/index.vue'),
  },
  {
    // 路由路径
    path: '/Nutrition',
    // 路由名称
    meta: {
      title: '营养补充',
    },
    // 路由组件
    component: () => import('../views/Nutrition/index.vue'),
  },
  {
    // 路由路径
    path: '/family',
    // 路由名称
    meta: {
      title: '家庭常备',
    },
    // 路由组件
    component: () => import('../views/family/index.vue'),
  },
  {
    // 路由路径
    path: '/earandnose',
    // 路由名称
    meta: {
      title: '耳鼻咽喉',
    },
    // 路由组件
    component: () => import('../views/earandnose/index.vue'),
  },
  {
    // 路由路径
    path: '/andrology',
    // 路由名称
    meta: {
      title: '男科用药',
    },
    // 路由组件
    component: () => import('../views/andrology/index.vue'),
  },
  {
    // 路由路径
    path: '/orthopaedics',
    // 路由名称
    meta: {
      title: '骨科疼痛',
    },
    // 路由组件
    component: () => import('../views/orthopaedics/index.vue'),
  },
  {
    // 路由路径
    path: '/heartandbrain',
    // 路由名称
    meta: {
      title: '心脑血管',
    },
    // 路由组件
    component: () => import('../views/heartandbrain/index.vue'),
  },
  {
    // 路由路径
    path: '/Prescribe',
    // 路由名称
    meta: {
      title: '问诊开药',
    },
    // 路由组件
    component: () => import('../views/Prescribe/index.vue'),
  },
  {
    // 路由路径
    path: '/clinical',
    // 路由名称
    meta: {
      title: '临床医生',
    },
    // 路由组件
    component: () => import('../views/clinical/index.vue'),
  },
  {
    // 路由路径
    path: '/Consultant',
    // 路由名称
    meta: {
      title: '春雨顾问',
    },
    // 路由组件
    component: () => import('../views/Consultant/index.vue'),
  },
  {
    // 路由路径
    path: '/Skincare',
    // 路由名称
    meta: {
      title: '15天护肤计划',
    },
    // 路由组件
    component: () => import('../views/Skincare/index.vue'),
  },
   {
    // 路由路径
    path: '/Diet',
    // 路由名称
    meta: {
      title: '饮食宜忌',
    },
    // 路由组件
    component: () => import('../views/Diet/index.vue'),
  },
  {
    // 路由路径
    path: '/Staple',
    // 路由名称
    meta: {
      title: '主食',
    },
    // 路由组件
    component: () => import('../views/Staple/index.vue'),
  },
  {
    // 路由路径
    path: '/Process',
    // 路由名称
    meta: {
      title: '加工食品',
    },
    // 路由组件
    component: () => import('../views/Process/index.vue'),
  },
   {
    // 路由路径
    path: '/Fungi',
    // 路由名称
    meta: {
      title: '蔬菜菌类',
    },
    // 路由组件
    component: () => import('../views/Fungi/index.vue'),
  },
  {
    path:'/Eggs',
    meta:{
      title:'肉/蛋类',
    },
    component:()=>import('../views/Eggs/index.vue')
  },
  {
    path:'/Fruit',
    meta:{
      title:'水果',
    },
    component:()=>import('../views/Fruit/index.vue')
  },
  {
    path:"/Grass",
    meta:{
      title:'补品草药',
    },
    component:()=>import('../views/Grass/index.vue')
  },
  {
    path:'/Aquatic',
    meta:{
      title:'水产品',
    },
    component:()=>import('../views/Aquatic/index.vue')
  },
  {
    path:'/Seasoning',
    meta:{
      title:'调味品',
    },
    component:()=>import('../views/Seasoning/index.vue')
  },
  {
    path:'/Drink',
    meta:{
      title:'饮品',
    },
    component:()=>import('../views/Drink/index.vue')
  },
  {
    path:'/Snack',
    meta:{
      title:'零食小吃',
    },
    component:()=>import('../views/Snack/index.vue')
  },
  {
    path:'/Editor',
    meta:{
      title:'档案',
    },
    component:()=>import('../views/Editor/index.vue')
  },
  {
    path:'/Gpad',
    meta:{
      title:'患者评价',
    },
    component:()=>import('../views/Gpad/index.vue')
  },
  {
    path: '/listdetail/:id',
    meta: {
      title: '列表详情',
    },
    component: () => import('../views/listdetail/index.vue'),
  },
  // {
  //   path:'/xuni',
  //   meta:{
  //     title:'虚拟列表',
  //   },
  //   component:()=>import('../views/xuni/index.vue')
  // },
  {
    path: '/doctordetail',
    meta: {
      title: '医生详情',
    },
    component: () => import('../views/doctordetail/index.vue'),
  },
  {
    path: '/kepudetail',
    meta: {
      title: '专家详情',
    },
    component: () => import('../views/kepudetail/index.vue'),
  },
  {
    path: '/Doctor',
    meta: {
      title: '找医生',
    },
    component: () => import('../views/Doctor/index.vue'),
  },
  {
    path: '/Cultivation',
    meta: {
      title: '健康养成计划',
    },
    component: () => import('../views/Cultivation/index.vue'),
  },
  {
       path: '/searchdoctor',
    meta: {
      title: '找医生',
    },
    component: () => import('../views/searchdoctor/index.vue'),
    },
  {
    path: '/homesearch',
    meta: {
      title: '首页搜索'
    },
    component: () => import('../views/homesearch/index.vue')
  },
  {
    path: '/Clinic',
    meta: {
      title: '诊所',
    },
    component: () => import('../views/Clinic/index.vue'),
  },
  {
    path: '/code',
    meta: {
      title: '验证码',
    },
    component: () => import('../views/code/index.vue'),
  },
  // {
  //   path: '/zixunxiangqin',
  //   meta: {
  //     title: '咨询详情',
  //   },
  //   component: () => import('../views/zixunxiangqin/index.vue'),
  // },
  {
    path: '/pic',
    meta: {
      title: '账户信息',
    },
    component: () => import('../views/pic/index.vue'),
  },
  {
    path: '/update',
    meta: {
      title: '修改信息',
    },
    component: () => import('../views/update/index.vue'),
  },
  {
    path: '/Enquirefordetails',
    meta: {
      title: '咨询详情'
    },
    component: () => import('../views/Enquirefordetails/index.vue'),
  },
  {
    path: '/pic',
    meta: {
      title: '账户信息',
    },
    component: () => import('../views/pic/index.vue'),
  },
  {
    path: '/pinglun',
    meta: {
      title: '评论',
    },
    component: () => import('../views/pinglun/index.vue'),
  },
  {
    path: '/update',
    meta: {
      title: '修改信息',
    },
    component: () => import('../views/update/index.vue')
  },
  {
    path: '/address',
    meta: {
      title: '地址管理'
    },
    component: () => import('../views/address/index.vue'),
  },
  {
    path: '/chun',
    meta: {
      title: '健康详情'
    },
    component: () => import('../views/chun/index.vue')
  },
  {
    path: '/cultivation',
    meta: {
      title: '8天健康养成计划'
    },
    component: () => import('../views/cultivation/index.vue')
  },
  {
    path: '/plan',
    meta: {
      title: '全部计划'
    },
    component: () => import('../views/plan/index.vue')
  },
  {
    path: '/Medic',
    meta: {
      title: '春雨医生'
    },
    component: () => import('../views/Medic/index.vue')
  },
  {
    path: '/Address_details',
    meta: {
      title: '删除'
    },
    component: () => import('../views/Address_details/index.vue')
  },
   {
    path:'/Love',
    meta:{
      title:'爱心页面'
    },
    component:()=>import('../views/Love/index.vue')

  },
  {
    path: '/addressadd',
    meta: {
      title: '地址管理'
    },
    component: () => import('../views/addressadd/index.vue')
  },
  {
    path: '/MyDoctor',
    meta: {
      title: '我的医生'
    },
    component: () => import('../views/MyDoctor/MyDoctor.vue')
  },
  {
    path: '/chun',
    meta: {
      title: '健康详情'
    },
    component: () => import('../views/chun/index.vue'),
  },
  {
    path: '/Pimple',
    meta: {
      title: '21天战痘计划'
    },
    component: () => import('../views/pimple/index.vue')
  },
  {
    path: '/Sleep',
    meta: {
      title: '睡眠改善计划'
    },
    component: () => import('../views/Sleep/index.vue')
  },

  {
    path: '/Leg',
    meta: {
      title: '21天瘦腰计划'
    },
    component: () => import('../views/Leg/index.vue')
  },
  {
    path: '/Waist',
    meta: {
      title: '21天瘦腿计划'
    },
    component: () => import('../views/Waist/index.vue')
  },
  {
    path: '/homestead',
    meta: {
      title: '7天宅家运动计划'
    },
    component: () => import('../views/homestead/index.vue')
  },
  {
    path: '/Lose',
    meta: {
      title: '30天减肥饮食计划'
    },
    component: () => import('../views/Lose/index.vue')
  },
  {
    path: '/women',
    meta: {
      title: '30天减肥运动计划'
    },
    component: () => import('../views/women/index.vue')
  },
  {
    path: '/Todetail',
    meta: {
      title: '详情'
    },
    component: () => import('../views/Todetail/index.vue')
  },
  {
    path: '/editor',
    meta: {
      title: '档案'
    },
    component: () => import('../views/editor/index.vue')
  },
  {
    path: '/Tobingli',
    meta: {
      title: '病例夹'
    },
    component: () => import('../views/Tobingli/index.vue')
  },
  {
    path: '/edit',
    meta: {
      title: '信息编辑'
    },
    component: () => import('../views/edit/index.vue')
  },
  {
    path: '/Topi',
    meta: {
      title: '15天护肤计划'
    },
    component: () => import('../views/Topi/index.vue')
  }, {
    path: '/shoucang',
    meta: {
      title: '收藏'
    },
    component: () => import('../views/shoucang/index.vue')
  },
  {
    path: '/cultivation',
    meta: {
      title: '8天健康养成计划'
    },
    component: () => import('../views/cultivation/index.vue'),
  },
  {
    path: '/plan',
    meta: {
      title: '全部计划',
    },
    component: () => import('../views/plan/index.vue'),
  },
  {
    path: '/Address_details',
    meta: {
      title: '地址详情',
    },
    component: () => import('../views/Address_details/index.vue'),
  },
  {
    path: '/ji',
    meta: {
      title: '15天护肤计划',
    },
    component: () => import('../views/ji/index.vue'),
  },
  {
    path: '/cart',
    meta: {
      title: '购物车',
    },
    component: () => import('../views/cart/index.vue'),
  },
  {
    path: '/cartdetail',
    meta: {
      title: '购物车详情',
    },
    component: () => import('../views/cartdetail/index.vue'),
  },
  {
    path: '/payment',
    meta: {
      title: '支付',
    },
    component: () => import('../views/payment/index.vue'),
  },
  {
    path: '/illness',
    meta: {
      title: '疾病',
    },
    component: () => import('../views/illness/index.vue'),
  },
  {
    path: '/Parenting_knowledge',
    meta: {
      title: '育儿知识',
    },
    component: () => import('../views/Parenting_knowledge/index.vue'),
  },
  {
    path: '/Dietary_restrictions',
    meta: {
      title: '饮食宜忌',
    },
    component: () => import('../views/Dietary_restrictions/index.vue'),
  },
  {
    path: '/vaccine_time',
    meta: {
      title: '疫苗时间',
    },
    component: () => import('../views/vaccine_time/index.vue'),
  },
  {
    path: '/Growth_curve',
    meta: {
      title: '生长曲线',
    },
    component: () => import('../views/Growth_curve/index.vue'),
  },
  {
    path: '/plan',
    meta: {
      title: '全部计划'
    },
    component: () => import('../views/plan/index.vue')
  },
  // {
  //   path: '/delete',
  //   meta: {
  //     title: '删除'
  //   },
  //   component: () => import('../views/delete/index.vue')
  // },
  {
    path: '/cart',
    meta: {
      title: '购物车'
    },
    component: () => import('../views/cart/index.vue')
  },
  {
    path: '/cartdetail',
    meta: {
      title: '购物车详情'
    },
    component: () => import('../views/cartdetail/index.vue')
  },
  // {
  //   path: '/order',
  //   meta: {
  //     title: '订单'
  //   },
  //   component: () => import('../views/order/index.vue')
  // },
  {
    path: '/shoucang',
    meta: {
      title: '收藏'
    },
    component: () => import('../views/shoucang/index.vue')
  },
  {
    path: '/payment',
    meta: {
      title: '支付'
    },
    component: () => import('../views/payment/index.vue')
  },
  // {
  //   path: '/queryOrder',
  //   meta: {
  //     title: "订单查询"
  //   },
  //   component: () => import('../views/queryOrder/index.vue')
  // },
  {
    path: '/parlour',
    meta: {
      title: '卖店铺'
    },
    component: () => import('../views/parlour/index.vue')
  },
  {
    path: '/word',
    meta: {
      title: '图文咨询'
    },
    component: () => import('../views/word/index.vue')
  },
  {
    path: '/phone',
    meta: {
      title: '电话咨询'
    },
    component: () => import('../views/phone/index.vue')
  },
  {
    path: '/video',
    meta: {
      title: '视频咨询'
    },
    component: () => import('../views/video/index.vue')
  },
  {
    path: '/jkdaxz',
    meta: {
      title: '健康档案跳转'
    },
    component: () => import('../views/jkdaxz/index.vue')
  }, {
    path: '/tg',
    meta: {
      title: '体重'
    },
    component: () => import('../views/tg/index.vue')
  }, {
    path: '/yd',
    meta: {
      title: '运动'
    },
    component: () => import('../views/yd/index.vue')
  },
  {
    path: '/xt',
    meta: {
      title: '血糖'
    },
    component: () => import('../views/xt/index.vue')
  },
  {
    path: '/xy',
    meta: {
      title: '血压'
    },
    component: () => import('../views/xy/index.vue')
  },
  {
    path: '/xl',
    meta: {
      title: '心率'
    },
    component: () => import('../views/xl/index.vue')
  },
  {
    path: '/sm',
    meta: {
      title: '睡眠'
    },
    component: () => import('../views/sm/index.vue')
  },
  {
    path: '/commonts',
    meta: {
      title: '咨询评论'
    },
    component: () => import('../views/commonts/index.vue')
  },
  {
    path:'/chatRoom',
    meta:{
      title:'聊天室'
    },
    component:()=>import('../views/chatRoom/index.vue')
  },
    {
    path:'/parlour',
    meta:{
      title:'卖店铺'
    },
    component:()=>import('../views/parlour/index.vue')
  },
    {
    path:'/jkdaxz',
    meta:{
      title:'健康档案跳转'
    },
    component:()=>import('../views/jkdaxz/index.vue')
  },{
     path:'/tg',
     meta:{
      title:'体重'
     },
     component:()=>import('../views/tg/index.vue')
  },{
      path:'/yd',
      meta:{
        title:'运动'
      },
      component:()=>import('../views/yd/index.vue')
  },
  {
    path:'/xt',
    meta:{
      title:'血糖'
    },
    component:()=>import('../views/xt/index.vue')
  },
  {
     path:'/xy',
     meta:{
      title:'血压'
     },
     component:()=>import('../views/xy/index.vue')
  },
   {
     path:'/xl',
     meta:{
      title:'心率'
     },
     component:()=>import('../views/xl/index.vue')
  },
  {
     path:'/sm',
     meta:{
      title:'睡眠'
     },
     component:()=>import('../views/sm/index.vue')
  },
    {
    path:'/commonts',
    meta:{
      title:'咨询评论'
    },
    component:()=>import('../views/commonts/index.vue')
  }
]




const router1 = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: ROOT_ROUTES,
})
const whiteList = ['/login', '/register', '/home', '/404', '/code', '/my']

router1.beforeEach((to, from, next) => {
  const token = localStorage.getItem('token') // 假设通过本地存储中的token来判断用户是否登录，实际可根据具体认证机制调整
  if (whiteList.indexOf(to.path) !== -1) {
    // 如果要访问的路径在白名单内，直接放行
    next()
  } else if (token) {
    // 如果有token，说明用户已登录，放行
    next()
  } else {
    // 没有token且不在白名单内，重定向到登录页
    next('/login')
  }
})


// import { createRouter, createWebHistory } from 'vue-router'

// 创建路由实例
const router = createRouter({
  // 使用HTML5的History路由模式

  history: createWebHistory(),
  // 定义路由
  routes: [
    {
      // 路由路径
      path: '/',
      // 路由名称
      name: 'layout',
      // 路由组件
      component: () => import('../views/layout/index.vue'),
      // 重定向
      redirect: '/home',
      // 子路由
      children: [

        {
         path:'/yd',
          // 路由元信息
          meta: {
            title: '引导页',
          },
          component:()=>import('../views/yd/index.vue'),

        },
        {
          // 路由路径
          path: '/home',
          // 路由元信息
          meta: {
            title: '首页',
          },
          // 路由组件
          component: () => import('../views/home/index.vue'),
        },
        {
          // 路由路径
          path: '/shop',
          // 路由元信息
          meta: {
            title: '商城',
          },
          // 路由组件
          component: () => import('../views/shop/index.vue'),
        },
        {
          // 路由路径
          path: '/healthy',
          // 路由元信息
          meta: {
            title: '健康',
          },
          // 路由组件
          component: () => import('../views/healthy/index.vue'),
        },
        {
          // 路由路径
          path: '/consultation',
          // 路由元信息
          meta: {
            title: '我的咨询',
          },
          // 路由组件
          component: () => import('../views/consultation/index.vue'),
        },
        {
          // 路由路径
          path: '/my',
          // 路由元信息
          meta: {
            title: '我的',
          },
          // 路由组件
          component: () => import('../views/my/index.vue'),
        },

        {
          // 路由路径
          path: '/followOfficialAccount',
          // 路由元信息
          meta: {
            title: '关注页',
          },
          // 路由组件
          component: () => import('../views/followOfficialAccount/index.vue'),
        },
        {
          path: '/mydoctor',
          name: '我的医生',
          component: () => import('../views/myDoctor/Mydoc.vue')
        },
        {
          // 新增档案
          path: '/newc',
          name: '新增档案',
          component: () => import('../views/newc/index.vue')
        },
<<<<<<< HEAD
        {
          //编辑档案
          path: '/oldc',
          name: '编辑档案',
          component: () => import('../views/oldc/index.vue')
        }
=======
           //编辑档案 
        //    {
      
        //   path: '/oldc',
        //   name: '编辑档案',
        //   component: () => import('../views/Oldcherater/Oldcherater.vue')
        // }
>>>>>>> f8fdea22ae4acc1c9fe5d22ca2989d51005ee5f3
      ],
    },
    {
          // 路由路径
          path: '/startTest',
          // 路由元信息
          meta: {
            title: '开始测试',
          },
          // 路由组件
          component: () => import('../views/startTest/index.vue'),
        },
        {
          // 路由路径
          path: '/Stresstesting',
          // 路由元信息
          meta: {
            title: '测试',
          },
          // 路由组件
          component: () => import('../views/Stresstesting/index.vue'),
        },
        {
      // 路由路径
      path: '/toDetails/:id',
      // 路由名称
      name: '医生祥情页',
      // 路由组件
      component: () => import('../views/toDetails/index.vue')
    },

         {
          // 路由路径
          path: '/hepatitisDetail',
          // 路由元信息
          meta: {
            title: '乙肝疫苗',
          },
          // 路由组件
          component: () => import('../views/hepatitisDetail/index.vue'),
        },
         {
          // 路由路径
          path: '/bcgVaccine',
          // 路由元信息
          meta: {
            title: '卡介苗',
          },
          // 路由组件
          component: () => import('../views/bcgVaccine/index.vue'),
        },
        {
          // 路由路径
          path: '/spinalCordDetail',
          // 路由元信息
          meta: {
            title: '脊髓灰质炎疫苗',
          },
          // 路由组件
          component: () => import('../views/spinalCordDetail/index.vue'),
        },
        {
          // 路由路径
          path: '/virusDetail',
          // 路由元信息
          meta: {
            title: '轮状病毒疫苗',
          },
          // 路由组件
          component: () => import('../views/virusDetail/index.vue'),
        },
         {
          // 路由路径
          path: '/rotavirusDetail',
          // 路由元信息
          meta: {
            title: '轮状减毒疫苗',
          },
          // 路由组件
          component: () => import('../views/rotavirusDetail/index.vue'),
        },
         {
          // 路由路径
          path: '/hibDetail',
          // 路由元信息
          meta: {
            title: 'Hib疫苗',
          },
          // 路由组件
          component: () => import('../views/hibDetail/index.vue'),
        },

     {
          // 路由路径
          path: '/startGame',
          // 路由元信息
          meta: {
            title: '育儿游戏',
          },
          // 路由组件
          component: () => import('../views/startGame/index.vue'),
        },

    {
      // 路由路径
      path: '/login',
      // 路由名称
      name: '登录',
      // 路由组件
      component: () => import('../views/login/index.vue'),
    },
      {
    path: '/code',
    name: '验证码登录',
    component: () => import('../views/code/index.vue'),
  },
    {
      // 路由路径
      path: '/search',
      // 路由名称toDetail
      name: '搜索页',
      // 路由组件
      component: () => import('../views/search/index.vue'),
    },
    {
      // 路由路径
      path: '/shopdetail/:id',
      // 路由名称
      name: '商城列表详情页',
      // 路由组件
      component: () => import('../views/shopdetail/index.vue'),
    },
    // toDetails
    {
      // 路由路径
      path: '/toDetails/:id',
      // 路由名称
      name: '医生祥情页',
      // 路由组件
      component: () => import('../views/toDetails/index.vue'),
    },
    // Toqbox
    {
      // 路由路径
      path: '/Toqbox',
      // 路由名称
      name: '点击全部科普',
      // 路由组件
      component: () => import('../views/Toqbox/index.vue'),
    },

    {
      // 路由路径
      path: '/cart',
      // 路由名称
      name: '购物车',
      // 路由组件
      component: () => import('../views/cart/index.vue')
    },
    {
      // 路由路径
      path: '/xinzeng',
      // 路由名称
      name: '新增',
      // 路由组件
      component: () => import('../views/xinZeng/index.vue')
    },
    {
      // 路由路径
      path: '/mind',
      // 路由名称
      name: '送心意',
      // 路由组件
      component: () => import('../views/mind/index.vue')
    },

    {
      // 路由路径
      path: '/skin',
      // 路由名称
      name: '皮肤用药',
      // 路由组件
      component: () => import('../views/skin/index.vue'),
    },
    {
      // 路由路径
      path: '/gynaecology',
      // 路由名称
      name: '妇科用药',
      // 路由组件
      component: () => import('../views/gynaecology/index.vue'),
    },
    {
      // 路由路径
      path: '/stomach',
      // 路由名称
      name: '肠胃消化',
      // 路由组件
      component: () => import('../views/stomach/index.vue'),
    },
    {
      // 路由路径
      path: '/breathing',
      // 路由名称
      name: '呼吸用药',
      // 路由组件
      component: () => import('../views/breathing/index.vue'),
    },
    {
      // 路由路径
      path: '/Nutrition',
      // 路由名称
      name: '营养补充',
      // 路由组件
      component: () => import('../views/Nutrition/index.vue'),
    },
    {
      // 路由路径
      path: '/family',
      // 路由名称
      name: '家庭常备',
      // 路由组件
      component: () => import('../views/family/index.vue')
    },
    {
      // 路由路径
      path: '/earandnose',
      // 路由名称
      name: '耳鼻咽喉',
      // 路由组件
      component: () => import('../views/earandnose/index.vue'),
    },
    {
      // 路由路径
      path: '/andrology',
      // 路由名称
      name: '男科用药',
      // 路由组件
      component: () => import('../views/andrology/index.vue'),
    },
    {
      // 路由路径
      path: '/orthopaedics',
      // 路由名称
      name: '骨科疼痛',
      // 路由组件
      component: () => import('../views/orthopaedics/index.vue'),
    },
    {
      // 路由路径
      path: '/heartandbrain',
      // 路由名称
      name: '心脑血管',
      // 路由组件
      component: () => import('../views/heartandbrain/index.vue'),
    },
    {
      // 路由路径
      path: '/Prescribe',
      // 路由名称
      name: '问诊开药',
      // 路由组件
      component: () => import('../views/Prescribe/index.vue'),
    },
    {
      // 路由路径
      path: '/clinical',
      // 路由名称
      name: '临床研究',
      // 路由组件
      component: () => import('../views/clinical/index.vue'),
    },
    //Tobthxq
    {
      // 路由路径
      path: '/GPad',
      // 路由名称
      name: '患者评价',
      // 路由组件
      component: () => import('../views/GPad/index.vue'),
    },
    {
      // 路由路径
      path: '/Tobthxq',
      // 路由名称
      name: '春雨医生绿卡会员',
      // 路由组件
      component: () => import('../views/Tobthxq/index.vue'),
    },
    // Htmlexpert
    {
      // 路由路径
      path: '/Plan',
      // 路由名称
      name: '健康计划',
      // 路由组件
      component: () => import('../views/Plan/index.vue')
    },
    {
      // 路由路径
      path: '/Htmlexpert',
      // 路由名称
      name: '科普专家',
      // 路由组件
      component: () => import('../views/Htmlexpert/index.vue'),
    },
     //八天健康计划 缓解颈椎疼痛
       {
         // 路由路径
      path: '/handie',
      // 路由名称
      name: '八天健康计划 缓解颈椎疼痛',
      // 路由组件
      component: () => import('../views/handie/index.vue'),
      },
       //拯救手腕痛"鼠标手"
       {
         // 路由路径
      path: '/handie1',
      // 路由名称
      name: '拯救手腕痛"鼠标手',
      // 路由组件
      component: () => import('../views/handie1/index.vue'),
      },
        //拯救手腕痛"鼠标手"
       {
         // 路由路径
      path: '/handie2',
      // 路由名称
      name: '缓解腰酸腰痛',
      // 路由组件
      component: () => import('../views/handie2/index.vue'),
      },
         {
         // 路由路径
      path: '/handie3',
      // 路由名称
      name: '改善圆肩驼背',
      // 路由组件
      component: () => import('../views/handie3/index.vue'),
      },
    {
      // 路由路径
      path: '/Consultant',
      // 路由名称
      name: '春雨健康顾问',
      // 路由组件
      component: () => import('../views/Consultant/index.vue'),
    },
    {
      // 路由路径
      path: '/Plan',
      // 路由名称
      name: '健康计划',
      // 路由组件
      component: () => import('../views/Plan/index.vue'),
    },
    {
      // 路由路径
      path: '/Evaluation',
      // 路由名称
      name: '健康测评',
      // 路由组件
      component: () => import('../views/Evaluation/index.vue'),

    },
    {
      // 路由路径
      path: '/hotDetail',
      // 路由名称
      name: '详情测评',
      // 路由组件
      component: () => import('../views/hotDetail/index.vue'),
      children:[
         {
      // 路由路径
      path: '/startTest',
      // 路由名称
      name: '开始测评',
      // 路由组件
      component: () => import('../views/startTest/index.vue'),

    },

      ]

    },

       {
         // 路由路径
      path: '/stomachTest',
      // 路由名称
      name: '胃部测评详情',
      // 路由组件
      component: () => import('../views/stomachTest/index.vue'),
      },

    {
      // 路由路径
      path: '/Vaccine',
      // 路由名称
      name: '疫苗时间',
      // 路由组件
      component: () => import('../views/Vaccine/index.vue'),
    },
    {
      // 路由路径
      path: '/Diet',
      // 路由名称
      name: '饮食宜忌',
      // 路由组件
      component: () => import('../views/Diet/index.vue'),
    },

    {
      // 路由路径
      path: '/Parenting',
      // 路由名称
      name: '育儿知识',
      // 路由组件
      component: () => import('../views/Parenting/index.vue'),
    },

    {
      // 路由路径
      path: '/Growth',
      // 路由名称
      name: '生长曲线',
      // 路由组件
      component: () => import('../views/Growth/index.vue'),
    },
    {
      // 路由路径
      path: '/Cultivation',
      // 路由名称
      name: '健康养成计划',
      // 路由组件
      component: () => import('../views/Cultivation/index.vue'),
    },
    {
      // 路由路径
      path: '/Skincare',
      // 路由名称
      name: '15天护肤计划',
      // 路由组件
      component: () => import('../views/Skincare/index.vue'),
    },
    {
      // 路由路径
      path: '/Medic',
      // 路由名称
      name: '欧茜医生',
      // 路由组件
      component: () => import('../views/Medic/index.vue'),
    },
    {
      // 路由路径
      path: '/Pimple',
      // 路由名称
      name: '21天战痘计划',
      // 路由组件
      component: () => import('../views/Pimple/index.vue'),
    },
    {
      // 路由路径
      path: '/Weight',
      // 路由名称
      name: '30天减肥运动计划',
      // 路由组件
      component: () => import('../views/Weight/index.vue'),
    },
    {
      // 路由路径
      path: '/Lose',
      // 路由名称
      name: '30天减肥饮食计划',
      // 路由组件
      component: () => import('../views/Lose/index.vue'),
    },
    {
      // 路由路径
      path: '/Homestead',
      // 路由名称
      name: '7天宅家运动计划',
      // 路由组件
      component: () => import('../views/Homestead/index.vue'),
    },
    {
      // 路由路径
      path: '/Waist',
      // 路由名称
      name: '21天瘦腰计划',
      // 路由组件
      component: () => import('../views/Waist/index.vue'),
    },

    {
      // 路由路径
      path: '/Leg',
      // 路由名称
      name: '21天瘦腿计划',
      // 路由组件
      component: () => import('../views/Leg/index.vue'),
    },
    {
      // 路由路径
      path: '/Sleep',
      // 路由名称
      name: '睡眠改善计划',
      // 路由组件
      component: () => import('../views/Sleep/index.vue'),
    },
 

    // 健康饮食
    {
      // 路由路径
      path: '/Staple',
      // 路由名称
      name: '主食',
      // 路由组件
      component: () => import('../views/Staple/index.vue'),
    },
    {
      // 路由路径
      path: '/Process',
      // 路由名称
      name: '加工食品',
      // 路由组件
      component: () => import('../views/Process/index.vue'),
    },
    {
      // 路由路径
      path: '/Fungi',
      // 路由名称
      name: '蔬菜菌类',
      // 路由组件
      component: () => import('../views/Fungi/index.vue'),
    },
    {
      // 路由路径
      path: '/Eggs',
      // 路由名称
      name: '肉/蛋类',
      // 路由组件
      component: () => import('../views/Eggs/index.vue'),
    },
    {
      // 路由路径
      path: '/Fruit',
      // 路由名称
      name: '水果',
      // 路由组件
      component: () => import('../views/Fruit/index.vue'),
    },
    {
      // 路由路径
      path: '/Grass',
      // 路由名称
      name: '补品草药',
      // 路由组件
      component: () => import('../views/Grass/index.vue'),
    },
    {
      // 路由路径
      path: '/Aquatic',
      // 路由名称
      name: '水产品',
      // 路由组件
      component: () => import('../views/Aquatic/index.vue'),
    },
    {
      // 路由路径
      path: '/Seasoning',
      // 路由名称
      name: '调味品',
      // 路由组件
      component: () => import('../views/Seasoning/index.vue'),
    },
    {
      // 路由路径
      path: '/Drink',
      // 路由名称
      name: '饮品',
      // 路由组件
      component: () => import('../views/Drink/index.vue'),
    },
    {
      // 路由路径
      path: '/Snack',
      // 路由名称
      name: '零食小吃',
      // 路由组件
      component: () => import('../views/Snack/index.vue'),
    },
    {
      // 路由路径
      path: '/Dairy',
      // 路由名称
      name: '豆/奶制品',
      // 路由组件
      component: () => import('../views/Dairy/index.vue'),
    },
    {
      // 路由路径
      path: '/Nut',
      // 路由名称
      name: '坚果类',
      // 路由组件
      component: () => import('../views/Nut/index.vue'),
    },
    // Editor
    {
      // 路由路径
      path: '/Editor',
      // 路由名称
      name: '档案',
      // 路由组件
      component: () => import('../views/Editor/index.vue'),
    },
    {
      // 路由路径
      path: '/Exchange',
      // 路由名称
      name: '兑换码页面',
      // 路由组件
      component: () => import('../views/Exchange/index.vue'),
    },
    {
      // 路由路径
      path: '/Tce',
      // 路由名称
      name: '春雨中医馆页面',
      // 路由组件
      component: () => import('../views/Tce/index.vue'),
    },
    {
      path: '/address',
      name: '我的地址',
      component: () => import('../views/Myaddress/Myaddress.vue')
    },
    //添加地址
    {
      path: '/add-address',
      name: '添加地址',
      component: () => import('../views/Address/Address.vue')
    },
    //修改地址
    {
      path: '/edit-address',
      name: '修改地址',
      component: () => import('../views/ChangeAddress/ChangeAddress.vue')
    },
    {
          path: '/mydoctor',
          name: '我的医生',
          component: () => import('../views/Mydoctor/Mydoc.vue')
        },
        {
          // 路由路径
          path: '/newc',
          name: '新增档案',
          component: () => import('../views/xinZeng/Newcherater.vue')
        },
    {
      path: '/wDoctor',
      name: '找医生',
      component: () => import('../views/wDoctor/index.vue'),
    },
    //账户管理
    {
      path: '/accountManagement',
      name: '账号管理',
      component: () => import('../views/Change/Change-manage.vue')
    },
    //修改姓名
    {
      path: '/changename',
      name: '修改姓名',
      component: () => import('../views/Changename/Changename.vue')
    },
    {
      path: '/msgNotify',
      name: '快速问诊',
      component: () => import('../views/msgNotify/index.vue'),
    },
    {
      path: '/my/myDoctor',
      meta: {
        title: '我的医生',
      },
      component: () => import('../views/myDoctor/index.vue'),
    },
    {
      path: '/my/cyVip',
      meta: {
        title: '春雨会员',
      },
      component: () => import('../views/cyVip/index.vue'),
    },
    {
      path: '/my/healthRecords',
      meta: {
        title: '健康档案',
      },
      component: () => import('../views/healthy/index.vue'),
    },
    {
      path: '/my/shippingAddress',
      meta: {
        title: '收货地址',
      },
      component: () => import('../views/shippingAddress/index.vue'),
    },
    {
      path: '/my/myPackage',
      meta: {
        title: '我的套餐包',
      },
      component: () => import('../views/myPackage/index.vue'),
    },
    {
      path: '/my/contactCustomerService',
      meta: {
        title: '联系客服'
      },
      component: () => import('../views/contactCustomerService/index.vue')
    },
    {
      path: '/my/bindPhone',
      meta: {
        title: '绑定手机',
      },
      component: () => import('../views/bindPhone/index.vue'),
    },
    {
      path: '/my/myAccount',
      meta: {
        title: '我的账户',
      },
      component: () => import('../views/myAccount/index.vue'),
    },
    {
      path: '/my/myCoupon',
      meta: {
        title: '我的优惠券',
      },
      component: () => import('../views/myCoupon/index.vue'),
    },
    {
      path: '/ShouSearch',
      meta: {
        title: '首页搜索',
      },
      component: () => import('../views/ShouSearch/index.vue'),
    },
    {
      path: '/codeLogin',
      meta: {
        title: '验证码登录',
      },
      component: () => import('../views/codeLogin/index.vue'),
    },
    {
      // 路由路径
      path: '/userXy',
      // 路由名称
      name: '用户协议',
      // 路由组件
      component: () => import('../views/userXy/index.vue'),
    },
    {
      // 路由路径
      path: '/ysXy',
      // 路由名称
      name: '隐私协议',
      // 路由组件
      component: () => import('../views/ysXy/index.vue'),
    },
    {
      // 路由路径
      path: '/zhMx',
      // 路由名称
      name: '账户明细',
      // 路由组件
      component: () => import('../views/zhMx/index.vue'),
    },
    {
      // 路由路径
      path: '/toSearch',
      // 路由名称
      name: '筛选',
      // 路由组件
      component: () => import('../views/shaixuan/index.vue'),
    },

    {
      // 路由路径
      path: '/listDetail/:id',
      // 路由名称
      name: 'tab热点列表详情',
      // 路由组件
      component: () => import('../views/detail/index.vue'),
    },
    // Exdetalis
    {
      // 路由路径
      path: '/Exdetalis',
      // 路由名称
      name: '点击医生详情页',
      // 路由组件
      component: () => import('../views/Exdetalis/index.vue'),
    },
    {
      // 路由路径
      path: '/detail',
      // 路由名称
      name: '医生详情页',
      // 路由组件
      component: () => import('../views/detail/index.vue'),
    },
    {
      path: '/Heavy',
      name: '体重',
      component: () => import('../views/Heavy/index.vue')
    },
    //运动
    {
      path: '/Movement',
      name: '运动',
      component: () => import('../views/Movement/index.vue')
    },
    //血糖
    {
      path: '/Sugar',
      name: '血糖',
      component: () => import('../views/Sugar/index.vue')
    },
    // 血压
    {
      path: '/Blood',
      name: '血压',
      component: () => import('../views/Blood/index.vue')
    },
    //心率
    {
      path: '/Heart',
      name: '心率',
      component: () => import('../views/Heart/index.vue')
    },
    //睡眠
    {
      path: '/Seep',
      name: '睡眠',
      component: () => import('../views/Seep/index.vue')
    },
    //睡眠数据
    {
      path: '/aseep',
      name: '睡眠数据',
      component: () => import('../views/ASeep/index.vue')
    },
    //体重数据
    {
      path: '/aheavy',
      name: '体重数据',
      component: () => import('../views/AHeavy/index.vue')
    },
    {
      path: '/aheav',
      component: () => import('../views/AHeavy/inde.vue')
    },
    //运动数据
    {
      path: '/amove',
      name: '运动数据',
      component: () => import('../views/AMovement/index.vue')
    },
    //血糖数据
    {
      path: '/asugar',
      name: '血糖数据',
      component: () => import('../views/ASugar/index.vue')
    },
    //血压数据
    {
      path: '/ablood',
      name: '血压数据',
      component: () => import('../views/ABlood/index.vue')
    },
    //心率数据
    {
      path: '/aheart',
      name: '心率数据',
      component: () => import('../views/AHeart/index.vue')
    },
    //睡眠数据
    {
      path: '/aseep',
      name: '睡眠数据',
      component: () => import('../views/ASeep/index.vue')
    },
    // 新建病历
    {
      path: '/neww',
      name: '新建病历',
      component: () => import('../views/Addnewe/index.vue')
    },
    // 病历详情
    {
      path: '/editww',
      name: '病历详情',
      component: () => import('../views/Edneww/Edneww.vue')
    },
    //绑定设备
    {
      path: '/add',
      name: '绑定设备',
      component: () => import('../views/Add/Add.vue')
    },
    //设备
    {
      path: '/bindind',
      name: '设备',
      component: () => import('../views/Bindind/Bindind.vue')
    },
    // 绑定设备详情
    {
      path: '/bia',
      name: '绑定血压计',
      component: () => import('../views/ADDA/Adda.vue')
    },
    {
      path: '/bib',
      name: '绑定血糖仪',
      component: () => import('../views/ADDB/Addb.vue')
    },
    {
      path: '/bic',
      name: '绑定手表/手环',
      component: () => import('../views/ADDC/Addc.vue')
    },
    {
      path: '/bid',
      name: '绑定运动器械',
      component: () => import('../views/ADDD/Addd.vue')
    },
    {
      path: '/bie',
      name: '绑定体重/体脂秤',
      component: () => import('../views/ADDE/Adde.vue')
    },
    {
      path: '/ask',
      name: '问诊',
      component: () => import('../views/Ask/index.vue')
    },
    {
      path: '/videoask',
      name: '视频问诊',
      component: () => import('../views/Videoask/Videoask.vue')
    }
  ],
})

export default router

